$(function(){		
	//banner
	var mybanner = new Swiper(".banner .swiper-container", {
		effect : 'slider',//图片切换效果
		autoplay: 3000,//可选选项，自动滑动
		//autoplayDisableOnInteraction : true,//操作slider后重新启动自动切换
		pagination : '.banner .swiper-pagination',//分页器
		paginationClickable :true,//点击圆点切换
		prevButton: '.banner .swiper-button-prev',
		nextButton: '.banner .swiper-button-next',
		lazyLoading : true,//懒加载
		lazyLoadingInPrevNext : true,//提前加载图片
		lazyLoadingInPrevNextAmount : 1,//提前加载图片数量				
		speed:300,//切换速度
		simulateTouch : false,//图片不可拖动
		loop:true,//循环
	})
	//mybanner.enableKeyboardControl(); //开启键盘控制
	$(".banner").hover(function(){
		mybanner.stopAutoplay();
	},function(){
		mybanner.startAutoplay();
	})
	
	//product
	var myproduct = new Swiper(".index-product-img .swiper-container",{
		effect : 'coverflow',
		loop:true,
		loopAdditionalSlides : 1,//复制若干个slide
		autoplay: 3000,
		prevButton: '.index-product-img .swiper-button-prev',
		nextButton: '.index-product-img .swiper-button-next',	
		
		slidesPerView: 3,
		centeredSlides: true,
		coverflow: {
            rotate: 0,
            stretch: 30,
            depth: 300,
            modifier: 1,
            slideShadows : false
        }
	})
	$(".index-product-img img,.index-product-img .swiper-button-prev,.index-product-img .swiper-button-next").hover(function(){
		myproduct.stopAutoplay();
	},function(){
		myproduct.startAutoplay();
	})
})